 /**
 * jims
 */
 package com.jims.master.modules.sync.dao;


import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.sync.entity.ClinicMaster;
import org.apache.ibatis.annotations.Param;

import java.util.List;


 /**
 * 门诊摘要DAO接口
 * @author ct
 * @version 2017-11-17
 */
@MyBatisDao
public interface ClinicMasterDao extends CrudDao<ClinicMaster> {

 public ClinicMaster getByClinicId(@Param("clinicId") String clinicId);
 public ClinicMaster getByClinic(@Param("clinicId") String clinicId);

  /**
   * 修改状态为已经就诊
   * @param clinicMaster
   * @return
   */
  public int updateClinicType(ClinicMaster clinicMaster);
  public int updateClinin(@Param("hisPresent")String hisPresent, @Param("chiefComplaint")String chiefComplaint, @Param("clinicId")String clinicId);
  /**
   * 通过医生和患者身份证号查询患者的开单记录
   * @param doctorId
   * @param patientId
   * @return
   */
  public List<ClinicMaster> getByDocPatIdCard(@Param("doctorId")String doctorId, @Param("patientId")String patientId);
  /**
   * 查询当天是否开单
   * @param clinicNo
   * @return
   */
  public Integer isBilling(@Param("clinicNo")String clinicNo);
  /**
   * 获取当天最大visitNo
   * @param orgId
   * @return
   * @author 赵宁
   */
  public int getMaxNo(@Param("orgId")String orgId);
  /**
   * 获取一段时间内未上传的开单列表
   * @param clinicMaster
   * @return
   * @author WangYQ
   */
  public List<ClinicMaster> getNoUploadedBilling(ClinicMaster clinicMaster);

  /**
   * 获取传到his的开单、转诊列表
   * @param clinicMaster
   * @return
   * @author WangYQ
   */
  public List<ClinicMaster> getUploadedBilling(ClinicMaster clinicMaster);

  public int deleteClinic(@Param("id")String id);

  public List<ClinicMaster> getZhuanZheng(@Param("doctorId")String doctorId);

  public List<ClinicMaster> getKaiDan(@Param("doctorId")String doctorId);

  public int updatePublic(@Param("state") String state,@Param("id") String id);

 }